Render each aura range separately, as is done for normal lights #3779
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Identify the Bug or Feature request
#3426
Description of the Change
Auras now calculate a separate area for each range, and associate those ranges with the corresponding colour in a
DrawableLight
. Previous behaviour was to render the full area of the aura repeatedly, once for each range.Colourless ("bright") auras are not actually rendered, giving the effect of transparency. This matches the behaviour for lights and allows creating auras that start a certain range away from the token. Previous behaviour was to render such auras as white with a hardcoded alpha of 150. White auras can still be had by explicitly setting the colour to white, and this will also respect the users opacity preferences.
ZoneView.getLights(Type)
has now been specialized to just handle auras, since that is all it was being used for anyways. Normal lights are handled a different way altogether.Possible Drawbacks
Anyone using a purely colourless aura intending for a white value will now get nothing. Setting the aura colour to explicitly white will get a similar effect, though the opacity will respect the user's preferences unlike before.
The
DrawableLight
s for auras are not cached inZoneView
, so there is the potential for some perf regression if other changes are made in the area.ZoneRenderer
does cache the results and only calls it at most once per frame, so the current state of things will be fine.Documentation Notes
Auras can have colours just like lights. Assigning different colours to different ranges will result in several colours being shown for the aura. E.g., if we have this aura:
and attach it to a token, it will look like this:
Note that the innermost range does not have a colour, and so is presented as transparent.
Release Notes
This change is